package com.example.light.web.personal.dao;

import com.example.light.web.personal.entity.Message;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MessageMapper {
    int deleteByPrimaryKey(Integer msgId);

    int insert(Message record);

    int insertSelective(Message record);

    Message selectByPrimaryKey(Integer msgId);

    int updateByPrimaryKeySelective(Message record);

    int updateByPrimaryKey(Message record);

    List<Message> selectWithUserEmail(@Param("email") String userEmail,@Param("status") Integer status, @Param("search") String search);

    Integer selectUnreadMessages(@Param("email") String userEmail,@Param("msgReaded") byte msgReaded);

    Integer selectDraft(@Param("email") String userEmail);

    Integer selectGarbage(@Param("email")String userEmail);

    List<Message> showMessages(@Param("email")String userEmail);
}